﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;

/// <summary>
/// Summary description for BUS_Product
/// </summary>
public class BUS_Product
{
    DAL_Product product = new DAL_Product();
    public void Product_Insert(DTO_Product obj)
    {
        
        try
        {
            product.Product_Insert(obj);
        }
        catch (Exception)
        {

            throw;
        }
       
    }
    public void Product_UpdateByAll(string Id, DTO_Product obj)
    {
        
        try
        {
            product.Product_UpdateByAll(Id, obj);
        }
        catch (Exception)
        {

            throw;
        }
       
    }
    public void Product_Update(string Id, string Set)
    {
       
        try
        {
            product.Product_Update(Id, Set);
        }
        catch (Exception)
        {

            throw;
        }
       
    }
    public void Product_Delete(string Id)
    {
       
        try
        {
            product.Product_Delete(Id);
        }
        catch (Exception)
        {

            throw;
        }
        
    }

    public DataTable Product_GetByAll()
    {
        DataTable dt = new DataTable();
        try
        {
            dt = product.Product_GetByAll();
        }
        catch (Exception)
        {

            throw;
        }
        return dt;
    }
    public DataTable Product_GetById(string Id)
    {
        DataTable dt = new DataTable();
        try
        {
            dt = product.Product_GetByID(Id);
        }
        catch (Exception)
        {

            throw;
        }
        return dt;
    }
    public DataTable Product_GetByTop(int top, string where, string order)
    {
        DataTable dt = new DataTable();
        try
        {
            dt = product.Product_GetByTop(top, where, order);
        }
        catch (Exception)
        {

            throw;
        }
        return dt;
    }
    public DataTable Product_Detail(string id)
    {
        DataTable dt = new DataTable();
        try
        {
            dt = product.Product_Detail(id);

        }
        catch (Exception)
        {

            throw;
        }
        return dt;
    }
}